package com.supcon.exchangedata.repository.slave3;


import com.supcon.exchangedata.pojo.entity.mysql.operation.sw.SwBasicInfo;
import com.supcon.exchangedata.pojo.entity.mysql.operation.sw.WaterDailyOpertionInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * 水务日运营数据
 *
 * @Author: yangbin
 * @Date: 2022/04/20/9:00
 * @Description:
 */
public interface SlaveSwOperationInfo3 extends JpaRepository<SwBasicInfo, Long> {


    @Transactional
    @Query(nativeQuery = true, value = "SELECT * FROM sw_basic_info WHERE biz_time = (SELECT MAX(biz_time) FROM sw_basic_info)")
    SwBasicInfo findTopData();

    List<SwBasicInfo> findAllByAreaType(String areaType);


}
